<template>
  <div class="scrollbar">
    <el-scrollbar>
      <div class="title">查看内容</div>
      <div v-html="selectTable.detail" class="content"></div>
    </el-scrollbar>
    <div v-loading="pload" class="footer">
      <el-button @click="$emit('close')">关 闭</el-button>
    </div>
  </div>
</template>

<script>
import { artGetById } from '@/utils/api'
export default {
  components: {
  },
  props: {
    data: Object
  },
  computed: {
    title() {
      return '查看内容'
    }
  },
  data() {
    return {
      pload: false,
      selectTable: {}
    }
  },
  created() {
    this.getData()
  },
  methods: {
    async getData() {
      this.pload = false
      const Datas = await artGetById({
        articleId: this.data.articleId
      })
      this.selectTable = Datas
    }
  }
}
</script>
<style lang="scss" scoped>
.scrollbar {
  height: 100%;
  overflow: hidden;
  padding-bottom: 50px;
  position: relative;
  .el-scrollbar {
    height: 100%;
  }
  .title {
    text-align: center;
    font-size: 16px;
    border-bottom: 1px #e4e4e4 solid;
    padding: 15px 0;
    margin-bottom: 15px;
  }
  .footer {
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
  }
  .content {
    padding: 20px;
  }
}
</style>
<style>
.img-s {
  max-width: 90%;
}
</style>